package cn.appsys.controller.deve;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.appsys.pojo.AppCategory;
import cn.appsys.service.deve.appcategory.DevAppCategoryService;

/**
 * 分类表控制类
 * @author Administrator
 *
 */
@Controller
@RequestMapping("/devAppCategory")
public class DevAppCategoryController {
	@Resource
	private DevAppCategoryService devAppCategoryService;
	
	/**
	 * ajxa异步查询分类列表
	 * @param pid
	 * @return
	 */
	@RequestMapping(value="/ajaxAppCategory/{pid}",method = RequestMethod.GET)
	@ResponseBody
	public Object ajaxAppCategory(@PathVariable("pid") Integer pid){
		//根据传过来的pid查询分类列表
		List<AppCategory> appCategory = devAppCategoryService.queryByParentId(pid);
		return appCategory;
	}
}
